package org.misty.practices.map.hashmap;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class HashMapSample02 {
    public static void main(String[] args) {
        int segments = 8;
        int cat = 64;

        var result = new HashMap<Integer, List<Integer>>();
        for (int i = 0; i < segments; i++) {
            result.put(i, new ArrayList<>());
        }

        for (var hash = 0; hash < 100; hash++) {
            result.get(hash % segments).add(hash % cat);
        }

        for (var me : result.entrySet()) {
            System.out.println(me.getKey() + " , " + me.getValue().toString());
        }

        Integer a = 1;
        System.out.println(a.hashCode());
        System.out.println(System.identityHashCode(a));
    }
}
